#ifndef C_LUA_INTERFACE_H_
#define C_LUA_INTERFACE_H_


extern "C"
{

	
#include <luajit-2.0/luajit.h>
#include <luajit-2.0/lua.h>
#include <luajit-2.0/lauxlib.h>
	
}

#include "log.h"


#define LuaNil( l ) \
	( lua_isnil( l, -1 ) == 0 ) ? false : true

#include <string>

namespace Lua
{
	
	void CreateAttackThinkData( int, int );
	
	bool AttackThinkFunc( int, int, int, int );

	void DelayedTimedUIMessage( std::string, double, double, int, int, int );
	
	void TimedUIMessage( std::string, double, double, int, int );
	
	void BattleText( std::string, int, int );
	
	void PopupText( std::string, double, double, int, int );

	void SetLuaState( lua_State * );
	
	void GenerateBattleTable();
	void AddEntityToBattleTable( int, int, int );
	
	void CallFunction( int );
	
	void SetGlobalInt( std::string, int );
	void SetGlobalBool( std::string, bool );
	
	//Entity functions
	void EntityOnTouch( int, int );
	void SetEntityLuaTableValue_Int( int, std::string, int );
	void SetEntityLuaTableValue_Bool( int, std::string, bool );
	
	bool GetEntityLuaTableValue_Bool( int, std::string );
	
};

#endif
